package concurrency;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;


public class CustomThreadPool {


	private static final int parallelThreads = 5;

	public static void main(String[] args) {

		try {
			ThreadPoolExecutor executor = new ThreadPoolExecutor(parallelThreads,parallelThreads,300L,TimeUnit.SECONDS,new LinkedBlockingQueue<Runnable>());

			executor.execute(new Runnable() {
				@Override
				public void run() {
					// TODO Auto-generated method stub

				}
			});

			//while (!executor.awaitTermination(300L, TimeUnit.SECONDS)) {}
		} catch (Exception e) {
			e.printStackTrace(System.out);
		}
	}



}
